package com.smalltao.sso.controller;

import com.smalltao.core.aop.SmalltaoLog;
import com.smalltao.core.base.controller.BaseController;
import com.smalltao.core.base.result.Result;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author smallTao.liu
 * @version V1.0
 * @description
 * @date 2018/11/19 14:06
 */
@Controller
public class IndexController extends BaseController {

    @GetMapping("/")
    @SmalltaoLog(operationType = "index:", operationName = "首页")
    public String index() {
        return "/index";
    }

    @GetMapping("/test")
    @ResponseBody
    @RequiresPermissions("test")
    public Result test() {
        return new Result().success();
    }

}
